<?php


/** ensure this file is being included by a parent file */
defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

/**
 * @package	
 */
class HelpDeskHelperToolbar
{
	/**
	 * 
	 * @return unknown_type
	 */
    function defaults() 
    {
		mosMenuBar::startTable();
		mosMenuBar::spacer();
		mosMenuBar::publishList();
		mosMenuBar::spacer();
		mosMenuBar::unpublishList();
		mosMenuBar::spacer();
		mosMenuBar::editList();
		mosMenuBar::spacer();
		mosMenuBar::deleteList();
		mosMenuBar::spacer();
		mosMenuBar::addNew();
		mosMenuBar::spacer();
		mosMenuBar::endTable();
    }
    
	/**
	 * 
	 * @return unknown_type
	 */
	function edit()
	{
		mosMenuBar::startTable();
		mosMenuBar::save();
		mosMenuBar::spacer();
		$id = HelpDeskRequest::getVar( 'id' );
		if ( $id ) 
		{
			// for existing content items the button is renamed `close`
			mosMenuBar::cancel( 'cancel', HelpDeskText::_('Close') );
		} else {
			mosMenuBar::cancel();
		}
		mosMenuBar::spacer();
		mosMenuBar::endTable();
	}
	
    /**
     * 
     * @return unknown_type
     */
	function defineItem() 
	{
		mosMenuBar::startTable();
		mosMenuBar::spacer();
		mosMenuBar::custom('switch_define', "switch_f2.png", "switch_f2.png", HelpDeskText::_('Switch'), true);
		mosMenuBar::spacer();
		mosMenuBar::cancel('cancel', HelpDeskText::_('Close') );
		mosMenuBar::endTable();
	}
	

	/**
	 * 
	 * @return unknown_type
	 */
    function defaultsAddons() 
    {
		mosMenuBar::startTable();
		mosMenuBar::spacer();
		mosMenuBar::editList();
		mosMenuBar::spacer();
		mosMenuBar::deleteList( "", 'uninstall', HelpDeskText::_('Uninstall') );
		mosMenuBar::spacer();
		mosMenuBar::endTable();
    }
    
	/**
	 * 
	 * @return unknown_type
	 */
	function listTools() 
	{
		mosMenuBar::startTable();
		mosMenuBar::spacer();
		mosMenuBar::custom('pluginmanager', "../../components/"._THISCOMPONENT."/images/plugins.png", "../../components/"._THISCOMPONENT."/images/plugins.png", HelpDeskText::_('Plugin Manager'), false);
		mosMenuBar::endTable();
	}
	
	/**
	 * 
	 * @return unknown_type
	 */
	function viewTool() 
	{
		mosMenuBar::startTable();
		mosMenuBar::spacer();
		mosMenuBar::custom('view', "../../components/"._THISCOMPONENT."/images/forward.png", "../../components/"._THISCOMPONENT."/images/forward.png", HelpDeskText::_('Submit'), false);
		mosMenuBar::spacer();
		mosMenuBar::cancel('close', HelpDeskText::_('Close') );
		mosMenuBar::endTable();
	}
}